Sprinters vs Long-distance swimmers

Column

Introduction

Let me introduce myself. My name is Tessa, and I am a professional athlete. I swim in the national team and have won several national and international medals.

During competitions I listen to music that inspires and motivates me. So, for me and a lot of my team mates, music plays an important role in the optimal race preperation.

In swimming there are different diciplines. More specificly there are sprinters, and long-distance swimmers. Sprinters exert maximum effort for a short period of time, often no longer than 30 seconds. A long-distance swimmer does not have to be so explosive, and the exertion of their race usually lasts more than two minutes.

Of course not all swimmers lissten to music during their preperantion, but in my experience there are both sprinters and long-distance swimmers who have special playlists for competitions.

Research question

Since sprinters and long distance differ so much from each other in terms of performances, the research question I will try to answer in this portfolio is:

What are the differences between the motivation playlists of sprinters and long-distance swimmers?

First we look at the track level Spotify features of both playlists. Are there for example differences in energy, or tempo? I expect that the sprinter playlist contains more songs with higher energy and tempo.

Playlists

For this portfolio, I used several playlists of my teammates. I have subdivided these playlists in two groups, namely a playlist with tracks that sprinters listen to and one that long-distance swimmers listen to.

Typical tracks for sprinters:

  • “Thunderstruck” from AC/DC
  • “Let’s do this” from Outskrts

Typical tracks for long-distance swimmers:

  • “Nothing else matters” from Metallica
  • “Eye of the tiger” from Rocky IV

Column

Analysis

First lets look at the genres of each playlist


Main genres

As you can see, there is a clear difference between the two playlists. The long-distance playlist contains mostly pop songs, unlike the sprinters playlist, which mainly consists of rock songs.

Pop music is a genre that is often regarded as a softer alternative to rock. Pop involves more singing and vocal expression, with a danceable beat to it. Rock on the other hand is played on loud sounds of instruments and is high in energy.

In the following tabs of the analysis, we will dive deeper into the different playlist. Are there indeed noticeable differences in energy or danceability for example? Furthermore, we will explore individual songs that stand out in the data.

Changes in energy and danceability point out the differences between sprinters and long-distance swimmers


As the plots show, sprinters listen to music with higher energy, and the songs of long-distance swimmers have higher danceability.

One outlier in energy is the song “Nothing else matters” from Metallica. This song is 0.41 lower in energy than the median of the long-distance playlist. The expectation was that mostly high energy songs are played before the race. So why is this particular song, with relatively low energy, still in the long distance playlist? One explanation could be that people listen to this song because they want to control their nerves before the race and don’t want to listen to a very energetic song. The lyrics of the song could also play an important role. The song “Nothing else matters”, is about being honest with your feelings and expressing them. Putting yourself out there and take a risk. I can imagine that one could get more confidence from this song.

Danceability describes how suitable a song is for dancing. This is based on a combination of different musical elements, including temo, rithmstability and beat strength. If a track has 0 danceability, it is least danceable, and a danceability of 1.0 means it is most danceable. The median of the long-distance playlist is 0.70, which is higher than the median of 0,51 from the sprinters playlist.

In the sprinters playlist, there is one outlier. The track “Moth Into Flame” from Metallica has a very low danceability of 0.16. On the other hand, the track has a very high energy of 0.98. Listening to the song makes me understand why a sprinter would listen to it right before a race. During a race, sprinters have a relatively high arm frequency (number of strokes you make per minute). Therefore, a track that is high in energy and tempo could help to get into the right state of mind.

Lets look at the tempo. Do sprinters listen to tracks with a higher tempo?


The tempo histogram shows the tempi of the two playlists. We can see that the mean tempo of the sprinters playlist is 138.6 BPM and the mean tempo of the long-distance playlist is 120.9 BPM. That the tempo of the playlist for sprinters is higher than that of the long-distance playlist is in line with our expectations. Given that the two main genres, Rock and Metal, usually have a higher tempo than pop and Hip Hop music:

Genre Tempo (BPM)
Pop 100-130
Rock 110-140
Metal 100-160
Hip Hop 85-115

Looking at the histogram, only two tracks from the sprinters playlist have a tempo below 100 BPM. This are the tracks “Basket Case” and “Eyes of a panther”. Especially the last one is interesting. According to Spotify, this track has a BPM of 88.6. However, if you listen to it, it doesn’t seem to have such a low tempo. In the next tab, we will look at a tempogram of this song to figure out what is happening.

Diving deeper into “Eyes of a panther” from Steel Panther by looking at tempograms


Tempo is the speed or pace of music. It is usually described in beats per minute (BPM), or how many pulses per minute. A tempogram can be used as an indicator of the local relevance of a specific tempo for a specific track for each time instance. The plots at the left show a Fourier-based tempogram that attempts to use Spotify’s API to analyse the tempo of two songs: Eyes of a Panther, and Lease On Life. Overall, Spotify estimates that the tempo of both tracks are 88 BPM. However, when we listen to both songs, they sound very different. When we look at the tempograms of both songs, we can see that there is a bright yellow line around 90 BPM. Nonetheless, there is a difference between the two tempograms. The tempogram of Eyes of a Panther, also has bright yellow spots all over the tempogram, instead of just at 90 BPM. This could indicate that tempo estimation is extremely hard for this song. In contrast to Lease On Life, where the tempogram is mainly dark blue, and only shows a yellow color at 90BPM, which matches the estimated tempo Spotify gave us.

If we summarize the tempo, duration and volume features, is there a clear difference between the playlists?


Summarizing low level track features like duration, volume and tempo results in the plot on the left. At first it might seem that this plot only shows a lot of points. However, there are some interesting observations to make.

First, if we look at the size of the points, we can see that the points of the long-distance playlist are a bit larger than the points of the sprinters playlist. This means that in general the duration of the tracks of the long-distance playlist are longer. The longest track of the long-distance playlist 410sec and the shortest track is 158sec. This differs for the sprinters playlist, where the longest track is 350sec and the shortest only 90sec.

Furthermore, comparing the overall volume of the two playlists, both playlists do not seem to differ very much. The average volume of both playlists are almost identical, namely -5.3 dBFS.

Nothing else matters from Metallica was the track wiht the lowes energy. What was the structure of the song in terms of chroma and timbre?


The plot on the left shows a self-similarity matrix of pitch, and on the right we can see a self-similarity matrix of timbre. The diagonal line in the middle means that the song is exactly the same at that time, in terms of timbre and pitch. This makes sense, because the song is compared to itself, and thus will be the same at the matching time.

The bright yellow stripes indicate that the song is very different at a specific point in time, compared to another point in time. The pitch chromatogram contains a lot of bright yellow squares, indicating that the song has a lot of different sections.

Furhtermore, given the timbre self-similarity matrix, there is a light yellow bar at the bottom and left of the plot. This could mean that the first section of about 25 seconds contains different tibre features than the rest of the song.

Diving deeper into “Nothing else matters”: a keygram


The song Nothing else matters was the song with the lowest energy. So lets take a closer look at this song. A keygram of a song compares the keys of a song to a particular key template, to figure out the key of a song. When we look at the plot, the x-axis shows the time and duration of the song, and the y-axis shows the different possible keys. A dark color in the plot means that key matches the key in the template. If the color gets lighter, there isn’t a key that matches a particular key template.

So at the beginning of the song, and towards the end, there are no good matches. However, around time 100s we can see a very dark color for the E:min chord, so chances are that this chord matches the template at this time in the song.

It turns out this song is indeed played E minor. So this corresponds to the estimation of the keygram.

Classification

An important aspect of classification is feature selection. So lets have a look at what features are most important.


If we look at the plot, we can see that energy, danceability and the eleventh timbre coefficient are the most important features. This corresponds to our first expectations. In the analysis of the different spotify features, we could see that there was a big difference in energy and danceability between the two playlists. Duration and liveness are the least important features.

Now we use random forest to make classifications. During training and testing, all features are initially included.


Classification with random forest gives the following precision and recall:

Playlist Precision Recall
Long-distance 0.81 0.81
Sprinters 0.81 0.81

If we look at the heatmap, we can see that 10 of the songs in the sprinters playlist were not correctly classified. 9 songs were not correctly classified from the long-distance playlist. A reason for this could be that there are outliers in both playlists, in terms of energy and danceability. This could confuse the model in thinking that a song from the sprinters playlist with high danceability for example, belongs to the long-distance playlist.

Can we improve our model? We now use the top 6 most important features for classification.


After feature selection, the model slightly improved. Now the precision of the sprinters playlist is 0.83 and the precision of the long-distance playlist is 0.85.

Conclusion

In the past 8 weeks of this course I have learned a lot about different Spotify fearues. I personally have no musical background, so to be able to apply several features to two playlists has been very interesting.

The expectation was that the sprinters playlist contained songs with more energy than the long-distance playlist. This turned out to be the case. In fact, energy was one of the most important features for classification. Along with danceability.

The sprinters and long-distance playlists both contained 52 songs, so they are not very large. This makes it a bit harder to make meaningful classifications. However, we still obtained precision of …. I did not expect this to be so high.

To conclude, in the future during competitions, I will know exactly which of the playlists I am going to listen to. I prefer to listen to the sprinters playlist, where the songs have higher energy.